package com.github.zzay.care.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.zzay.care.dto.VolunteerDto;
import com.github.zzay.care.entity.Volunteer;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zzay
 * @interfaceName VolunteerMapper
 * @description Mapper class for entity "Volunteer"
 * @create 2022/07/06 08:56
 */
@Mapper
@Repository
public interface VolunteerMapper extends BaseMapper<Volunteer> {

    /**
     * Select all information.
     *
     * @return A list of all information
     */
    List<VolunteerDto> selectAll();

    /**
     * Select the volunteer with the given name.
     *
     * @param name Name
     * @return Volunteer with the given name
     */
    VolunteerDto selectByName(String name);


    /**
     * Select the volunteer with the given id card number.
     *
     * @param idCard ID card number
     * @return Volunteer with the given id card number
     */
    VolunteerDto selectByIdCard(String idCard);

}
